/**
 * 
 */
package com.mvity.framework.common.utils;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.mvity.framework.common.base.BaseUtil;
import com.mvity.framework.common.cache.SessionCache;
import com.mvity.framework.system.cache.UserAccountCache;
import com.mvity.framework.system.cache.UserCache;

/**
 * @author vity
 * @date 2012-9-28
 * @mail vity.1215@gmail.com
 */
public class AppInitListener extends BaseUtil implements ServletContextListener {

	private static final long serialVersionUID = 1269736543146375334L;

	/*
	 * (non-Javadoc)
	 * 
	 * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.
	 * ServletContextEvent)
	 */
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * javax.servlet.ServletContextListener#contextInitialized(javax.servlet
	 * .ServletContextEvent)
	 */
	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		UserCache.getCache().initCache();
		UserAccountCache.getCache().initCache();
		SessionCache.getCache().initCache();
		logger.info("框架缓存初始化成功。");
	}
}
